﻿using DevTeam;
using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

namespace ConfExpert.Forms.Depo
{
    public partial class DetailA : XPopupForm
    {
        public DetailA(int AksesuarId)
        {
            InitializeComponent();
            DataTable dt = ExecuteDataTable("GetAksPhoto", AksesuarId);
            if (dt.Rows.Count>0)
            {
                this.Text = dt.Rows[0]["StokKod"].ToString();
                Image img = ConvertByteArrayToImage((byte[])dt.Rows[0]["Photo2"]);
                //Image img = Image.FromFile(FileName);
                pictureEdit1.Image = img;
                pictureEdit1.Width = img.Width;
                pictureEdit1.Height = img.Height;
                pictureEdit1.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Squeeze;
                this.Width = img.Width + 25;
                this.Height = img.Height + 45;
                this.StartPosition = FormStartPosition.CenterScreen;
            }
        }

        private void DetailA_Load(object sender, EventArgs e)
        {
            
            
        }
    }
}
